package net.chrisrichardson.cloudtools.maven.plugins;

import net.chrisrichardson.ec2deployer.cluster.ClusterManager;
import net.chrisrichardson.ec2deployer.cluster.SimpleCluster;

/**
 * Goal which stops the cluster
 * 
 * @goal stop
 * 
 */
public class StopMojo extends AbstractClusterMojo {

  @Override
  protected void executeWithCluster(ClusterManager manager, SimpleCluster cluster) {
    cluster.stop();
  }

  @Override
  protected void postExecute(ClusterManager manager, SimpleCluster cluster) {
    manager.removeCluster(getClusterName());
  }
  
}
